/***************************************************************************************************
 *
 * Project: ChinesePod
 *
 * Class: Definition
 *
 * File name: Definition.java
 *
 * Jul 23, 2007
 *
 **************************************************************************************************/

package com.eastmountain.chinese.db.flashcards.records;

import com.eastmountain.util.DisplayFormats;

abstract public class ChineseElementXRF  extends ChineseElementKey {

    protected short    lessonNumber   = 0;

    public ChineseElementXRF() {

    }

    public ChineseElementXRF( String chineseElement, String simplifiedTraditional,
                              int lessonNumber ) {

        super( chineseElement, simplifiedTraditional,
               lessonNumber );

        this.lessonNumber   = (short)lessonNumber;

    }

    public short getLessonNumber() {

        return lessonNumber;
    }

    public void setLessonNumber( short lessonNumber ) {

        this.lessonNumber = lessonNumber;
    }

    @Override
    public String toString() {

        String element = getChineseElement();

        String elementXRF

        = "\nChineseElement -"
            + "\nWord - Character: " + element
            + "\nin Hex:           " + DisplayFormats.stringToHex( element )
            + "\nLessonNumber:     " + getLessonNumber();

        return( elementXRF );

    }

}
